{% extends "base.html" %}

{% block title %}{{ playlist.name }}{% endblock %}

{% block content %}
<section class="playlist-detail">
    <h2>{{ playlist.name }}</h2>
    <div class="songs-list">
        {% for song in playlist.songs %}
        <div class="song-item">
            <h3>{{ song.title }}</h3>
            <audio controls>
                <source src="{{ url_for('static', filename='songs/' + song.filename) }}" type="audio/mpeg">
                浏览器不支持音频播放
            </audio>
            <a class="lyrics-link" href="{{ url_for('song_detail', song_id=song.id) }}">查看歌词</a>
        </div>
        {% else %}
            <p>当前歌单暂无歌曲</p>
        {% endfor %}
    </div>
</section>
{% endblock %}
